<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>版本详情</title>
    <meta name="viewport" content="width=device-width initial-scale=1 user-scalable=yes"/>
    <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="https://imgcache.qq.com/qcloud/cloudbase-js-sdk/1.6.0/cloudbase.full.js"></script>
    <script src="./cloudbase/cloudbase-login.js"></script>
    <script src="./cloudbase/cloudbase-api.js"></script>
    <link rel="stylesheet" href="js/bootstrap-4.5.3-dist/css/bootstrap.css">
    <script src="js/bootstrap-4.5.3-dist/js/bootstrap.js"></script>
    <script type="text/javascript" src="layui/layui.js"></script>
    <script type="text/javascript" src="jcui/jcui.js"></script>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <link id="zhandianIcon" rel="shortcut icon" href="https://7372-srrz-2g24l1oea7a7e67e-1304952114.tcb.qcloud.la/icon/shanerji.png" >
    <style>
         html,body{
             width:100%;
             height: 100%;
         }

         body{
             padding:30px 10px;
         }
    </style>
</head>
<body>

<ul id="ullist" class="layui-timeline"></ul>
</body>
</html>
<script>
    $(function (){

        init()
        async function init(){

            let li = await getSgbVersionList()
            let data =  li
            let $html = ``
            for(let i = 0 ; i < data.length ; i++){

                let time = dateFormat(data[i]['update'],"yyyy-MM-dd hh:ss:mm")

                let msg = data[i]['context']

                let v = data[i]['version']

                if(msg!==undefined){

                    if(i==0){

                        $li = `<li class="layui-timeline-item">
                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                        <h5 style="padding-left:20px;" class="layui-timeline-title">${time}</h5>
                        <div class="layui-timeline-content layui-text">
                        ${msg}
                        </div>
                       </li>`

                    }else{
                        $li = `<li class="layui-timeline-item">
                        <i class="layui-icon layui-timeline-axis ">&#xe63f;</i>
                        <h5 style="padding-left:20px;" class="layui-timeline-title">${time}</h5>
                        <div class="layui-timeline-content layui-text">
                        ${msg}
                        </div>
                       </li>`
                    }
                    $html+=$li
                }
            }
            $("#ullist").html($html)
        }
    })

</script>
